<?php
//No direct access
defined('_JEXEC') or die('Restricted access');
$priceformat = OwnserviceHelper::getParams('price_format', '#,###.##');
?>
<div id="ownservices">
	<div id="mainmenuownservice"><?php echo MenuHelper::nav(); ?></div>
		<div id="mainownservice">
			 <form action="<?php echo JRoute::_('index.php'); ?>" method="post" name="adminForm">
				<h3><?php echo JText::_('OWNSERVICE_CONFIRM_DETAIL'); ?></h3>
				<hr />
				<table width="100%" cellspacing="5" cellpadding="5">
					<?php
					  if(isset($this->rows['account'])) :
						foreach($this->rows['account'] as $i=>$row):
					?>
						<tr>
							<td class="key"><?php echo JText::_('OWNSERVICE_RECEIVER_NAME'); ?></td>
							<td><?php echo @$this->rows['accountdetail'][$i]->account_name; ?></td>
						</tr>
						<tr>
							<td class="key"><?php echo JText::_('OWNSERVICE_ACCOUNT_NO'); ?></td>
							<td><?php echo $row; ?></td>
						</tr>
						<tr>
							<td class="key"><?php echo JText::_('OWNSERVICE_BANK_NAME'); ?></td>
							<td><?php echo @$this->rows['accountdetail'][$i]->bank_name; ?></td>
						</tr>
						<tr>
							<td class="key"><?php echo JText::_('OWNSERVICE_BRANCH_NAME'); ?></td>
							<td><?php echo @$this->rows['accountdetail'][$i]->branch_name; ?></td>
						</tr>
						<tr>
							<td class="key"><?php echo JText::_('OWNSERVICE_AMOUNT'); ?></td>
							<td>
								<?php echo $this->rows['amount_dollar'][$i]; ?> AUD
							</td>
						</tr>
						<tr>
							<td class="key"><?php echo JText::_('OWNSERVICE_EXCHANGE_RATE'); ?></td>
							<td><?php echo $this->owndata->rate; ?> <?php echo $this->owndata->code; ?>/1 AUD</td>
						</tr>
						<tr>
							<td class="key"><?php echo JText::_('OWNSERVICE_TOTAL_EXCHANGE'); ?></td>
							<td>
								<?php echo $this->rows['amount_thai'][$i].' '.$this->owndata->code; ?>
							</td>
						</tr>
						<tr>
							<td class="key"><?php echo JText::_('OWNSERVICE_REASON'); ?></td>
							<td>
								<?php if($this->rows['reason'][$i] == 'Other'): ?>
									<?php echo $this->rows['other'][$i]; ?>
								<?php else: ?>
									<?php echo $this->rows['reason'][$i]; ?>
								<?php endif; ?>
							</td>
						</tr>
						<tr>
							<td class="key"><?php echo JText::_('OWNSERVICE_COMMENT'); ?></td>
							<td><?php echo $this->rows['comment'][$i]; ?></td>
						</tr>
						<tr>
							<td colspan="2"><hr /></td>
						</tr>
					<?php
						endforeach;
					endif;
					?>
				</table>
				<div style="text-align:center; margin-top:5px;">
					<input type="button" name="next" value="<?php echo JText::_('OWNSERVICE_CONFIRM_TRANSFER'); ?>" onClick="javascript:submitbutton('transfered');" />
					<input type="button" name="cancel" value="<?php echo JText::_('OWNSERVICE_BACK'); ?>" onClick="javascript:history.go(-1);" />
				</div>
				<input type="hidden" name="option" value="com_ownservice" />
				<input type="hidden" name="controller" value="ownservice" />
				<input type="hidden" name="task" value="" />
				<?php echo JHTML::_( 'form.token' ); ?>
			 </form>
		</div>
</div>